import { opType } from '@src/const';
import request from './index';

// 操作类型
export type valueOfOpTypes = (typeof opType)[keyof typeof opType];

// 获取直播间或者直播信息
export default function sendCode(
  phoneNumber: string,
  type: valueOfOpTypes = opType.register,
  usename?: string,
) {
  return request({
    method: 'post',
    url: '/account/sendCode',
    data: {
      phoneNumber,
      type,
      usename,
    },
  });
}
